<?php

namespace App\Http\Controllers;

use App\Svip;
use Illuminate\Http\Request;

class Day15 extends Controller
{
    //
    public function dataSvip(Request $request)
    {
        $name = $request['name'];
        $model = new Svip();
        $res = $model ->dataSvip($name);
//        print_r($res);die;
        if($res)
        {
            return ['code'=>0,'msg'=>'添加成功','res'=>$res];
        }else{
            return ['code'=>1,'msg'=>'添加失败','res'=>null];
        }
    }

    public function dataShow()
    {
        $model = new Svip();
        $res = $model->dataShow();
        if($res)
        {
            return ['code'=>0,'msg'=>'ok','res'=>$res];
        }else{
            return ['code'=>1,'msg'=>'on','res'=>null];
        }

    }
}
